<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Test30</title>
</head>
<body>
    <script type="text/javascript">
        pai();
        function pai() {
            var r =parseInt(prompt("请输入圆的半径") );
            var s = 3.14*Math.pow(r,2);
            var c = 3.14*2*r;
            alert("圆的面积为："+s+"   圆的周长为："+c);
        }
    </script>
</body>
</html>